CREATE TABLE [dbo].[DnnProduct_AnonymousUsers]
(
[UserID] [char] (36) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[PortalID] [int] NOT NULL,
[TabID] [int] NOT NULL,
[CreationDate] [datetime] NOT NULL CONSTRAINT [DF_DnnProduct_AnonymousUsers_CreationDate] DEFAULT (getdate()),
[LastActiveDate] [datetime] NOT NULL CONSTRAINT [DF_DnnProduct_AnonymousUsers_LastActiveDate] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_AnonymousUsers] ADD CONSTRAINT [PK_DnnProduct_AnonymousUsers] PRIMARY KEY CLUSTERED  ([UserID], [PortalID]) WITH (FILLFACTOR=85) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_AnonymousUsers] WITH NOCHECK ADD CONSTRAINT [FK_DnnProduct_AnonymousUsers_DnnProduct_Portals] FOREIGN KEY ([PortalID]) REFERENCES [dbo].[DnnProduct_Portals] ([PortalID]) ON DELETE CASCADE NOT FOR REPLICATION
GO
